home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
lawn.zip
/
LAWN.DOC
< prev
next >
Wrap
Text File
|
1991-07-09
|
10KB
|
228 lines
LAWN Control Program for the PC v1.10
Copyright (c) 1991 by Adrienne Cousins
All Rights Reserved
VersaWare
30 Jennifer Street, Littleton, MA 01460
508-486-9351 (Voice 9am-4pm Eastern)
508-486-8507 (24 hour Support BBS)
Lawn stands for Local Area Wireless Network. It is manufactured by
O'Neill Communications, Inc. (OCI) in Princeton, New Jersey.
It is a small white box, 4" x 2" x 7" in size, that is attached to a
serial port with an included cable. It uses Spread Spectrum Radio
frequency, to transmit data from Lawn to Lawn at distances of 100 to
500 feet away from each other.
Lawns come with software that performs electronic mail functions, file
send operations, and modem and printer sharing.
They can also be used to run remote communications programs such as
pcAnywhere, Carbon Copy, Remote2, Close-up, Co/Session and PC-Tools/Commute.
They also work well with all communications programs, and many stand-alone
protocol drivers such as DSZ and BIMODEM.
This program provides a means of controlling a Lawn from the DOS prompt
without requiring the LAWNTSR program from OCI. It also provides access
to many of the Lawn internal commands and functions that are not accessable
with the software from OCI.
This is useful in batch files, when it may be desirable to connect two
Lawns for a file transfer or any other operation, and then disconnect
the Lawns when the operation is finished. This will leave the target
Lawn available for connects from other systems.
It also comes in handy if you want to attach a Lawn to an X10 Computer
Interface CP290. A PC system can attach to the X10/Lawn, send commands to
program timed events and then disconnect, leaving both Lawns (and your
serial port) available for other operations.
This is the reason that I wrote LAWN, and the remainder of the documentation
will address the issues involved in setting up your X10 on a Lawn.
-----------------------------------------
LAWN command syntax & functions:
LAWN <cmd>[,<cmd>][,<cmd>] [>>outfile]
Where <cmd> can be any valid switches or Lawn command.
All commands are executed in the order that they appear in the command line.
Valid switches are as follows:
? Print a short help text to the screen
-A Echo all Lawn I/O to the screen in ascii
Causes all data sent to or received from the Lawn to be echoed to
the screen in ascii. This can also be redirected to any standard
output device or file.
LAWN -A,-I,MYCALL,MHEARD >TEST.LOG
-Bn Set baud rate of serial port (300-19200)
Causes the serial port to be set to the specified speed. This
is useful following an ABAUD command to the Lawn:
LAWN -I,ABAUD 19200,-B19200
-C Put Lawn into command mode (cmd:)
Puts the Lawn into command mode so that it prints the 'cmd:' prompt
and is ready to accept commands.
LAWN -C,DISCON
-H Echo all Lawn I/O to the screen in hexadecimal
Causes all data sent to or received from the Lawn to be echoed to
the screen as hexadecimal bytes. This data can also be redirected
to any standard output device or file.
LAWN -I,-H,-W >TEST.LOG
-I Initialize serial port to same speed as Lawn
Checks for the existence of a Lawn on the specified serial port
at all of the possible baud rates supported by the Lawn. Once
a Lawn is detected, the serial port is set to the matching baud rate.
After the -I switch, the Lawn will be left in command mode (cmd:).
LAWN -I
-Pn Serial port that Lawn is connected to (1-4)
Use this switch to specify a serial port other the default of COM1.
Multiple -P switches may appear on the line, to send commands to
multiple serial ports in a single command.
LAWN -A,-P1,-I,MYCALL,-P2,-I,MYCALL
-Tf:l Change timeout counters (first:last)
The value called FIRST, is the timeout in ticks until the first
byte is received from the Lawn. The value called LAST, is the
timeout in ticks after the last byte is received from the Lawn.
FIRST defaults to 36 (2 secs), and LAST defaults to 18 (1 sec).
-W Watch for any data received from the Lawn
This monitors the serial port for any data received from the Lawn.
It is only useful in conjunction with the -A and -H echo switches.
This mode is terminated on any keystroke.
LAWN -A,-W
Valid Lawn LAWN commands are as follows, only the uppercased letters of
each command are required:
ABaud n - Baud rate (n=300,600,1200,2400,4800,9600,19200)
ABOrt - abort any active process & disconnect
ANtenna n - Mode of antenna operation (0=switching,1=ant0,2=ant1)
AUtolf on/off - controls auto line-feed
AWlen 7/8 - data word length for serial port
Beacon x n - set beacon frequency (x=A,E n=0-250 1=3.3s)
BLink n - Lawn power light blink count per 5 seconds (n=0-8)
BReak - send a BREAK to far side Lawn
BREAKLen n - set length of break (0-250 1=33.3ms)
CHAn n - select Lawn channel (n=1-4)
CMdtime n - seconds delay required before ^Cs for cmd mode
COnnect - show connect state
COnnect name - direct connect to another Lawn
COnnect name [VIA n1 n2] - connect via lawn N1 and N2
CONOk on/off - control connect from other Lawns
CONVers - enable converse mode
CStatus - show channel status
DAytime - show current date & time
DAytime YYMMDDHHMM - set current date & time
DFc on/off - default connect on data from serial port
DFCN name - default connect Lawn name
DIGipean on/off - control use as a VIA Lawn
Disconnect - disconnect from other Lawn
DISP - display all internal LAWN variables
Echo on/off - control command line echo
EMail on/off - control email mode
EMSgs - check email status
MHClear - clear active LAWN list
MHeard - show active LAWNS in current system
MYcall - show name of local Lawn
MYcall name - set local Lawns name
NEwmode on/off - ON enters TRANS mode on CONNECT
OFF stays in COMMAND mode
Ocimode on/off - ON stays in TRANS mode on CONNECT
OFF enters TRANS mode on CONNECT
Paclen n - packet length (n=0-256)
PACTime x n - packet transmision frequency (x=A,E n=0-250 1=33ms)
PARity n - parity (0=none 1=odd 2=none 3=even)
REAd - read next received email message
REConne - reinitialize connection to current LAWN
RESet - reset all Lawn variables & counters to factory defaults
RESTart - reset counters & displays ROM version if MYCALL<>DFCN
REtry n - maximum number for TRIES counter (n=0-31)
SElftest - perform selftest & RESTART command
STatus - show number of outstanding transmissions
SYsnum n - set security code (n=0-65535)
TImeout n - disconnect time for DFC ON (n=0-250 1=5s)
Trans - enable TRANSPARENT mode
TRFlow on/off - control XON/XOFF handshake on RX line
TXFlow on/off - control XON/XOFF handshake on TX line
Xflow on/off - master switch for XON/XOFF handshake
-----------------------------------------
Some special notes for connecting an X10 to a Lawn:
Since both the Lawn and the X10 are DCE devices, you must cross pins
2 and 3 between the Lawn and the X10, using either a null-modem cable
or a break-out box.
The Lawn that is to be connected to an X10 should initially be connected
to a PC and configured with the following command (you may replace the
two occurrances of X10 with any preferred 6 character name):
LAWN -a,-i,di,reset,-i,ab 600,-b600,-c,my x10,dfcn x10,pact e 1
This sets the Lawn to the factory defaults, then sets the baud rate to
600 baud which is required by the X10 hardware. It then sets the Lawn
name and default-connect-to name to X10 (which you may change), and then
sets the PACTIME to EVERY 1 which is necessary so that any X10 software
won't timeout and think that the X10 isn't responding properly.
This also leaves the Lawn in NEWMODE ON mode which causes any CONNECT
command to immediately enter TRANSPARENT mode instead of staying at
command mode (cmd:).
-----------------------------------------
Here are some examples for using LAWN to control an X10 via a Lawn:
LAWN -a,-i,di,ab 600,-b600,co x10 >x10.log
XA f=reset.x10 >>x10.log
LAWN -a,-c,di,ab 19200,-b19200 >>x10.log
-a echo all I/O to the screen in ascii
-i initialize the serial port to match the Lawn
di disconnect any prior active connection
ab 600 set the Lawn baud rate to 600 baud
-b600 set the serial port to 600 baud
co x10 connect to the Lawn called X10
XA runs a shareware program called XA, which forces the
serial port to 600 baud. You may run any X10 software
you prefer at this point.
-a echo all I/O to the screen in ascii
-c put Lawn in command mode (cmd:)
di disconnect from the X10 Lawn
ab 19200 sets the Lawn speed to 19200 baud
-b19200 sets the serial port to 19200 baud
-----------------------------------------
Another alternative, is to use XL.EXE which is a copy of XA that I patched
so that it doesn't reset the speed of the serial port. This allows you
to send commands to your X10 without having to reset the speed of the
sending Lawn to 600 baud and then reset it to it's normal speed.
LAWN -a,-i,co x10 >x10.log
XL f=reset.x10 >>x10.log
LAWN -a,-c,di >>x10.log